{php include wl_template('common/header');}
<ul class="nav nav-tabs" id="myTab">
    <li><a href="javascript:;">退款记录</a></li>
</ul>
<div class="app-content">
	<div class="app-filter">
		<div class="filter-list">
			<form action="" method="get" class="form-horizontal" role="form" id="form1">
				<input type="hidden" name="c" value="site" />
				<input type="hidden" name="a" value="entry" />
				<input type="hidden" name="m" value="{MODULE_NAME}" />
				<input type="hidden" name="p" value="finace" />
				<input type="hidden" name="ac" value="finaceRefundRecord" />
				<input type="hidden" name="do" value="refundrecord" />
				<input type="hidden" name="paytype" value="{$_GPC['paytype']}" />
				<input type="hidden" name="type" value="{$_GPC['type']}" />
				<input type="hidden" name="plugin" value="{$_GPC['plugin']}" />
				<div class="form-group">
					<label class="col-sm-2 control-label">支付方式</label>
					<div class="col-sm-9">
						<div class="btn-group">
							<a href="{php echo wl_filter_url('paytype:0');}" class="btn {if intval($_GPC['paytype']) == 0}btn-primary{else}btn-default{/if}">全部</a>
							<a href="{php echo wl_filter_url('paytype:1');}" class="btn {if $_GPC['paytype'] == 1}btn-primary{else}btn-default{/if}">余额支付</a>
							<a href="{php echo wl_filter_url('paytype:2');}" class="btn {if $_GPC['paytype'] == 2}btn-primary{else}btn-default{/if}">微信支付</a>
							<a href="{php echo wl_filter_url('paytype:3');}" class="btn {if $_GPC['paytype'] == 3}btn-primary{else}btn-default{/if}">支付宝</a>
							<a href="{php echo wl_filter_url('paytype:5');}" class="btn {if $_GPC['paytype'] == 5}btn-primary{else}btn-default{/if}">小程序</a>
						</div>
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-2 control-label">退款方式</label>
					<div class="col-sm-9">
						<div class="btn-group">
							<a href="{php echo wl_filter_url('type:0');}" class="btn {if intval($_GPC['type']) == 0}btn-primary{else}btn-default{/if}">全部</a>
							<a href="{php echo wl_filter_url('type:1');}" class="btn {if $_GPC['type'] == 1}btn-primary{else}btn-default{/if}">手机端退款</a>
							<a href="{php echo wl_filter_url('type:2');}" class="btn {if $_GPC['type'] == 2}btn-primary{else}btn-default{/if}">后台退款</a>
							<a href="{php echo wl_filter_url('type:3');}" class="btn {if $_GPC['type'] == 3}btn-primary{else}btn-default{/if}">自动退款</a>
						</div>
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-2 control-label">所属插件</label>
					<div class="col-sm-9">
						<div class="btn-group">
							<a href="{php echo wl_filter_url('plugin:all');}" class="btn {if $_GPC['plugin'] == 'all' || empty($_GPC['plugin'])}btn-primary{else}btn-default{/if}">全部</a>
							<a href="{php echo wl_filter_url('plugin:rush');}" class="btn {if $_GPC['plugin'] == 'rush'}btn-primary{else}btn-default{/if}">抢购</a>
							<a href="{php echo wl_filter_url('plugin:groupon');}" class="btn {if $_GPC['plugin'] == 'groupon'}btn-primary{else}btn-default{/if}">团购</a>
							<a href="{php echo wl_filter_url('plugin:wifightgroup');}" class="btn {if $_GPC['plugin'] == 'wifightgroup'}btn-primary{else}btn-default{/if}">拼团</a>
							<a href="{php echo wl_filter_url('plugin:bargain');}" class="btn {if $_GPC['plugin'] == 'bargain'}btn-primary{else}btn-default{/if}">砍价</a>
						</div>
					</div>
				</div>
				<div class="form-group form-inline">
					<label class="col-sm-2 control-label">记录搜索</label>
					<div class="col-sm-9">
						<select name="keywordtype" class="form-control">
							<option value="1" {if $_GPC['keywordtype']==1}selected="selected"{/if}>订单号</option>
							<option value="2" {if $_GPC['keywordtype']==2}selected="selected"{/if}>三方单号</option>
							<option value="3" {if $_GPC['keywordtype']==3}selected="selected"{/if}>买家昵称</option>
							<option value="4" {if $_GPC['keywordtype']==4}selected="selected"{/if}>买家电话</option>
							<option value="5" {if $_GPC['keywordtype']==5}selected="selected"{/if}>商户名称</option>
						</select>
						<input type="text" name="keyword" class="form-control" value="{$_GPC['keyword']}"  placeholder="请输入关键字"/>
	                </div>
				</div>
				<div class="form-group">
					<label class="col-sm-2 control-label">退款时间</label>
					<div class="col-sm-9">
						{php echo tpl_select_time_info('time_limit', array('starttime' => date('Y-m-d',$starttime), 'endtime' => date('Y-m-d', $endtime)));}
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-2 control-label"></label>
					<div class="col-sm-9">
						<button class="btn btn-primary" id="search">筛选</button>
						<button class="btn btn-default min-width" name="export" type="submit" value="export"><i class="fa fa-download"></i>  导出记录</button>
					</div>
				</div>
			</form>	
		</div>
	</div>
	<div class="app-table-list">
        <div class="table-responsive">
            <table class="table table-hover">
                <thead class="navbar-inner">
                    <tr>
                        <th style="width:15%;">订单编号(三方单号)</th>
                        <th style="width:15%;">用户信息</th>
                        <th style="width:15%;">商品信息</th>
                        <th style="width:5%;">支付金额</th>
                        <th style="width:5%;">支付方式</th>
                        <th style="width:5%;">退款金额</th>
                        <th style="width:5%;">退款方式</th>
                        <th style="width:5%;">退款状态</th>
                        <th style="width:10%;">退款备注</th>
                        <th style="width:10%;">退款描述</th>
                        <th style="width:15%;">退款时间</th>
                    </tr>
                </thead>
                <tbody>
                    {loop $records $de}
                    <tr>
                        <td>{$de['orderno']}{if $de['transid']}<br/>({$de['transid']}){/if}</td>
                        <td><img src="{$de['avatar']}" style="width: 30px;height: 30px;"> {$de['nickname']}</td>
                        <td>{$de['goodsname']}</br>商户：{$de['storename']}</td>
                        <td style="color: green;">￥{$de['payfee']}</td>
                        <td>{$de['paytype']}</td>
                        <td style="color: red;">￥{$de['refundfee']}</td>
                        <td>{$de['type']}</td>
                        <td>
                        	{if $de['status'] == 1}
                        	<span  class="label label-success">退款成功</span>
                        	{else}
                        	<span  class="label label-danger">退款失败</span>
                        	{/if}
                        </td>
                        <td>{$de['remark']}</td>
                        <td>{if $de['errmsg']}{$de['errmsg']}{else}退款成功{/if}</td>
                        <td>{$de['createtime']}</td>
                    </tr>
                    {/loop}
                </tbody>
            </table>
        </div>
        <div class="app-table-foot clearfix">
			<div class="pull-left">
				
			</div>
			<div class="pull-right">
				{$pager}
			</div>
		</div>
    </div>
</div>	
{php include wl_template('common/footer');}